load("//tools:clang.bzl", "clang_tool")
load("@com_grail_bazel_compdb//:defs.bzl", "compilation_database")
load("@com_grail_bazel_output_base_util//:defs.bzl", "OUTPUT_BASE")

clang_tool("clang-format")

clang_tool("clang-tidy")

compilation_database(
    name = "compdb",
    testonly = True,
    output_base = OUTPUT_BASE,
    targets = [
        # BEGIN compile_commands targets
        "//ast:ast",
        "//ast/desugar:desugar",
        "//ast/desugar:desugar_test",
        "//ast/packager:packager",
        "//ast/substitute:substitute",
        "//ast/treemap:treemap",
        "//ast/verifier:verifier",
        "//cfg:cfg",
        "//cfg/builder:builder",
        "//class_flatten:class_flatten",
        "//common:common",
        "//common:common_test",
        "//common/concurrency:concurrency",
        "//common/counters:counters",
        "//common/crypto_hashing:crypto_hashing",
        "//common/enforce_no_timer:enforce_no_timer",
        "//common/exception:exception",
        "//common/json2msgpack:json2msgpack",
        "//common/kvstore:kvstore",
        "//common/kvstore:kvstore_test",
        "//common/os:os",
        "//common/sort:sort",
        "//common/statsd:statsd",
        "//common/strings:strings",
        "//common/timers:timers",
        "//common/web_tracer_framework:tracing",
        "//common/web_tracer_framework:tracing_test",
        "//core:core",
        "//core:core_test",
        "//core:generate_names",
        "//core/hashing:hashing",
        "//core/proto:proto",
        "//core/serialize:serialize",
        "//core/serialize:serialize_test",
        "//core/sig_finder:sig_finder",
        "//core/source_generator:source_generator",
        "//definition_validator:definition_validator",
        "//emscripten:sorbet-wasm",
        "//emscripten:sorbet-wasm.d",
        "//gems/sorbet-runtime:generate_call_validation",
        "//hashing:hashing",
        "//hashing:hashing-orig",
        "//infer:infer",
        "//infer:infer_test",
        "//local_vars:local_vars",
        "//main:realmain",
        "//main:realmain-orig",
        "//main:sorbet",
        "//main:sorbet-orig",
        "//main/autogen:autogen",
        "//main/autogen/data:data",
        "//main/autogen/data:data_test",
        "//main/cache:cache",
        "//main/cache:cache-orig",
        "//main/lsp:error_reporter_test",
        "//main/lsp:generate_lsp_messages",
        "//main/lsp:generate_lsp_messages_test",
        "//main/lsp:lsp",
        "//main/lsp:lsp_file_updates_test",
        "//main/lsp:lsp_preprocessor_test",
        "//main/lsp:lsp_test",
        "//main/minimize:minimize",
        "//main/options:options",
        "//main/options:options_test",
        "//main/pipeline:pipeline",
        "//main/pipeline:pipeline-orig",
        "//main/pipeline/semantic_extension:interface",
        "//main/pipeline/semantic_extension:none",
        "//namer:namer",
        "//namer:namer_test",
        "//packager:packager",
        "//parser:generate_ast",
        "//parser:parser",
        "//parser:parser_test",
        "//parser/parser:generate_diagnostics",
        "//parser/parser:parser",
        "//parser/prism:prism",
        "//payload:interface",
        "//payload:payload",
        "//payload:text",
        "//payload/binary:binary",
        "//payload/binary:empty",
        "//payload/binary:gen_state_payload",
        "//payload/binary:some",
        "//payload/text:empty",
        "//payload/text:generate_payload",
        "//payload/text:some",
        "//payload/text:text",
        "//rbi:generate_procs",
        "//rbs:rbs",
        "//resolver:resolver",
        "//resolver/type_syntax:type_syntax",
        "//rewriter:rewriter",
        "//rewriter/util:util",
        "//sorbet_version:sorbet_version",
        "//test:backtrace-test-error",
        "//test:backtrace-test-raise",
        "//test:cancelable-indexer-test",
        "//test:error-check-test",
        "//test:hello-test",
        "//test:lsp_test_runner",
        "//test:parser_test_runner",
        "//test:pipeline_test_runner",
        "//test:pkg-autocorrects-test",
        "//test:pkg-condensation-test",
        "//test:print_document_symbols",
        "//test/fuzz:fuzz_dash_e",
        "//test/fuzz:fuzz_dash_e_impl",
        "//test/fuzz:fuzz_doc_symbols",
        "//test/fuzz:fuzz_hover",
        "//test/helpers:helpers",
        "//test/lsp:cache_protocol_test_corpus",
        "//test/lsp:multithreaded_protocol_test_corpus",
        "//test/lsp:protocol_test_corpus",
        "//test/lsp:watchman_test_corpus",
        "//third_party/licenses:generate_licenses",
        "//third_party/licenses:licenses",
        "//third_party/progressbar:progressbar",
        # END compile_commands targets
    ],
)
